<%--                                                                       --%>
<%-- Copyright (c) 2005 BroadVision, Inc.  All rights reserved.            --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%
  String ctxPath = request.getContextPath();
%>

<script language="JavaScript">

//
//
//
function setQualifiers(ids, names) {
  document.bpProcessQualifiersForm.selectedIds.length = 0;
  for (var index = 0; index < ids.length; index++) {
    var option = new Option(names[index], ids[index], true, true);
    document.bpProcessQualifiersForm.selectedIds.options[index] = option;
  }
  document.bpProcessQualifiersForm.submit();
}

//
//
//
function setQualifierValues(ids, names) {
  document.bpProcessQualifierView.selectedIds.length = 0;
  for (var index = 0; index < ids.length; index++) {
    var option = new Option(names[index], ids[index], true, true);
    document.bpProcessQualifierView.selectedIds.options[index] = option;
  }
  document.bpProcessQualifierView.action = '<c:url value="/bp/processQualifierValuesSave.do"/>';
  document.bpProcessQualifierView.submit();
}

//
//
//
function setQualifierId(qualifierId) {
  document.bpProcessQualifierView.qualifierId.value = qualifierId;
}
  
//
//
//
function doQualifierValuesMultiEdit(qualifierId) {
  document.bpProcessQualifierView.qualifierId.value = "";
  if (0 != qualifierId) {
    document.bpProcessQualifierView.qualifierId.value = qualifierId;
  }
  document.bpProcessQualifierView.action = '<c:url value="/bp/processQualifierValuesMultiEdit.do"/>';
  document.bpProcessQualifierView.submit();
}
  
//
//
//
function doQualifierRemove(qualifierId) {
  document.bpProcessQualifierView.qualifierId.value = "";
  document.bpProcessQualifierView.qualifierType.value = "0";
  if (1 == qualifierId) {
    document.bpProcessQualifierView.qualifierType.value = "1";
  }
  else if (0 != qualifierId) {
    document.bpProcessQualifierView.qualifierId.value = qualifierId;
  }
  document.bpProcessQualifierView.action = '<c:url value="/bp/processQualifiersRemove.do"/>';
  document.bpProcessQualifierView.submit();
}

<%@ include file="/mc/common/jsutils.jsp" %>

</script>

<c:set var="pageTitle" value="${bpProcessQualifierView.map.name}"/>
<c:set var="editable" value="true"/>

<form name="bpProcessQualifierView" method="post">

<input type="hidden" name="processOid" value="<c:out value="${bpProcessQualifierView.map.oid}"/>"/>
<input type="hidden" name="ctx.f" value="<c:out value="${requestScope['ctx.f']}"/>"/>

<select name="selectedIds" multiple="multiple" size="0"></select>
<script language="JavaScript1.2">
var theform = document.forms['bpProcessQualifierView'];
theform.selectedIds.style.visibility = 'hidden';
theform.selectedIds.style.display = 'none';
</script>

<%@include file="/ep/qualifier/iqualifierValueObjectQualifiersViewBody.jsp" %>

</form>

<form name="bpProcessQualifiersForm" action="<c:url value="/bp/processQualifiersSave.do"/>" method="post">

  <input type="hidden" name="processOid" value="<c:out value="${bpProcessQualifierView.map.oid}"/>"/>
  <input type="hidden" name="ctx.f" value="<c:out value="${requestScope['ctx.f']}"/>"/>

  <select name="selectedIds" multiple="multiple" size="0"></select>
  <script language="JavaScript1.2">
  var theform = document.forms['bpProcessQualifiersForm'];
  theform.selectedIds.style.visibility = 'hidden';
  theform.selectedIds.style.display = 'none';
  </script>

</form>
